package com.belazy.library.model.enums;

/**
 * @Description <p> 系统访问来源枚举 </p>
 * @Author chupeng.tang
 * @CreateTime 2023/5/19 17:29
 * @Version 1.0
 */
public enum  SourceEnum {
    /**
     * App访问来源标识
     */
    APP("App"),
    /**
     * WED访问来源
     */
    WEB("Web");
    public String source;
    SourceEnum(String source) {
        this.source = source;
    }

    /**
     * 检查是否存在枚举中
     * @param source
     * @return
     */
    public static boolean check(String source){
       for(SourceEnum sourceEnum :SourceEnum.values ()) {
           if(sourceEnum.source.equalsIgnoreCase (source)){
               return false;
           }
       }
       return  true;
    }
}
